<?php namespace Common\Model;
use Hdphp\Model\Model;


class OrderList extends Model{
	//指定表名
	protected $table = 'order_list';
	
	
	//添加订单列表
	public function store($oid){
		foreach ($_SESSION['cart']['goods'] as $k => $v) {
			$_POST['quantity'] = $v['num'];
			$_POST['subtotal'] = $v['total'];
			$_POST['wsshop_goods_gid'] = $v['id'];
			$_POST['wsshop_order_oid'] = $oid;
			$this->create();
			$this->add();//添加订单列表
		}
		
		return true;
	}
	
}
 ?>